package com.hdoit.apollo.web.stock.modelconfig;
import com.tennetcn.core.common.enums.regular.MathRegularExpressions;
import com.tennetcn.web.component.attribute.DateTimeAttribute;
import com.tennetcn.web.component.attribute.DisplayNameAttribute;
import com.tennetcn.web.component.attribute.RegularExpressionAttribute;
import com.tennetcn.web.component.attribute.base.ModelMetadataAttributeConfiguration;

/**
 * @author      tancongzhu
 * @email       
 * @createtime  2018年05月30日 09:47:40
 * @comment
 */
public class InventoryConfig extends ModelMetadataAttributeConfiguration{
    public InventoryConfig(){
        this.setProperty("inventoryState")
            .hasAttribute(new DisplayNameAttribute("盘点状态"));

        this.setProperty("inventoryNo")
            .hasAttribute(new DisplayNameAttribute("盘点单号"));

        this.setProperty("overageNum")
            .hasAttribute(new DisplayNameAttribute("盘盈数"))
            .hasAttribute(new RegularExpressionAttribute(MathRegularExpressions.naturalNumber));

        this.setProperty("lossNum")
            .hasAttribute(new DisplayNameAttribute("盘亏数"))
            .hasAttribute(new RegularExpressionAttribute(MathRegularExpressions.naturalNumber));

        this.setProperty("actualNum")
            .hasAttribute(new DisplayNameAttribute("实际数"))
            .hasAttribute(new RegularExpressionAttribute(MathRegularExpressions.naturalNumber));

        this.setProperty("bookNum")
            .hasAttribute(new DisplayNameAttribute("账面数"))
            .hasAttribute(new RegularExpressionAttribute(MathRegularExpressions.naturalNumber));

        this.setProperty("overageTypeNum")
            .hasAttribute(new DisplayNameAttribute("盘盈种类数"))
            .hasAttribute(new RegularExpressionAttribute(MathRegularExpressions.naturalNumber));

        this.setProperty("lossTypeNum")
            .hasAttribute(new DisplayNameAttribute("盘亏种类数数"))
            .hasAttribute(new RegularExpressionAttribute(MathRegularExpressions.naturalNumber));

        this.setProperty("actuaTypelNum")
            .hasAttribute(new DisplayNameAttribute("实际种类数"))
            .hasAttribute(new RegularExpressionAttribute(MathRegularExpressions.naturalNumber));

        this.setProperty("bookTypeNum")
            .hasAttribute(new DisplayNameAttribute("账面种类数"))
            .hasAttribute(new RegularExpressionAttribute(MathRegularExpressions.naturalNumber));

        this.setProperty("shopId")
            .hasAttribute(new DisplayNameAttribute("门店id"));
        
        this.setProperty("createDate")
	        .hasAttribute(new DisplayNameAttribute("盘点时间"))
	        .hasAttribute(new DateTimeAttribute());

	    this.setProperty("createUserName")
	        .hasAttribute(new DisplayNameAttribute("盘点人"));
	    
	    this.setProperty("comment")
        	.hasAttribute(new DisplayNameAttribute("备注"));

	    this.setProperty("adjustmentCargoId")
	      .hasAttribute(new DisplayNameAttribute("选择货物"));
    }
}
